<?php

namespace common\entities\myhtsq;

use common\entities\ContractEntity;
use Yii;

/**
 * This is the model class for table "myscrm_special_approval_invoice".
 *
 * @property string $special_approval_invoice_id
 * @property string $invoice_no
 * @property string $category
 * @property string $promise_fulfil_time
 * @property string $promise_fulfil_principle
 * @property string $actual_fulfil_time
 * @property string $comment
 * @property string $created_on
 * @property string $created_by
 * @property string $modified_on
 * @property string $modified_by
 */
class SpecialApprovalInvoiceEntity extends ContractEntity
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'myscrm_special_approval_invoice';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['special_approval_invoice_id'], 'safe'],
            [['promise_fulfil_time', 'actual_fulfil_time', 'created_on', 'modified_on'], 'safe'],
            [['comment'], 'string'],
            [['special_approval_invoice_id', 'promise_fulfil_principle', 'created_by', 'modified_by'], 'string', 'max' => 36],
            [['invoice_no'], 'string', 'max' => 50],
            [['category'], 'string', 'max' => 128]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'special_approval_invoice_id' => '特批开票ID',
            'invoice_no' => '发票编号',
            'category' => '特批类型',
            'promise_fulfil_time' => '承诺兑现时间',
            'promise_fulfil_principle' => '承诺兑现责任人',
            'actual_fulfil_time' => '实际兑现时间',
            'comment' => '备注',
            'created_on' => '创建时间',
            'created_by' => '创建人',
            'modified_on' => '修改时间',
            'modified_by' => '修改人',
        ];
    }
}
